package leave;

public class StudentList {
    //最多容纳10人
    protected static final int DEFAULE_SIZE = 10;
    //学生数组
    protected LeaveStudent[] leaveStudents = new LeaveStudent[DEFAULE_SIZE];
    //下标
    protected int useSize;

    public StudentList() {
        leaveStudents[0] = new LeaveStudent("张三",101,"计算机学院",false);
        leaveStudents[1] = new LeaveStudent("李四",102,"医护学院",true);
        leaveStudents[2] = new LeaveStudent("王五",103,"汽修学院",true);
        this.useSize = 3;
    }

    public LeaveStudent getLeaveStudents(int pos) {
        return leaveStudents[pos];
    }

    //下标的get方法
    public int getUseSize() {
        return useSize;
    }


    //下标的set方法
    public void setUseSize(int useSize) {
        this.useSize = useSize;
    }
}
